<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>公共统计配置管理 </title>
<@fm.header />
<link rel="stylesheet" type="text/css" href="/resources/css/uploadify/uploadify.css">
<script type="text/javascript" src="/resources/js/common.js"></script>
<script type="text/javascript" src="/resources/js/logStatisticsAction/logStatisticsAction.js"></script>
</head>
<body class="cmp-list-body">
<div id="tb" style="padding:3px">
    <span>统计名称</span>
	<input id="snameId" class="easyui-textbox" style="width: 155px;" name="name"/>
	<span>操作表名</span>
	<input id="sactionTableNameId" class="easyui-textbox" style="width: 155px;" name="actionTableName"/>
	<span>状态</span>
	<select class="easyui-combobox" id="sstatusId" panelHeight="auto" style="width:155px" >
	        <option value="" selected>全部</option>
            <option value="0">未启用</option>
        	<option value="1">启用</option>
    </select>
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch();">查询</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doAdd();">新增</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doEdit();">修改</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doDel();">删除</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doStatus(1);">启动</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doStatus(0);">暂停</a>


</div>
<table id="tt" title="公共统计配置管理 " 
	 toolbar="#tb" rownumbers="true" idField="id"
	singleSelect="true"   pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]">  
    <thead>
        <tr>
            <th align="left" width="15%" field="name">统计名称</th>    
            <th align="center" width="10%" field="actionTableName">操作表名</th>
            <th align="center" width="12%" field="actionType" formatter="actionTypeFormatter">操作行为</th>
            <th align="center" width="12%" field="conditionKey">条件字段</th>
            <th align="center" width="12%" field="valueKey">计算字段</th>
            <th align="center" width="10%" field="interval" formatter="intervalFormatter">统计时间段</th>
            <th align="center" width="10%" field="syncTableName">同步表名</th>
            <th align="center" width="12%" field="status" formatter="statusFormatter">状态</th>
	        <th align="center" width="10%" field="modifyTime">修改时间</th>  
        </tr>
    </thead>   
</table>

<div id="addWin" class="easyui-window" title="公共统计配置管理|新增修改" closed="true" collapsible="false" minimizable="false"  maximizable="false" style="width:500px;height:450px"   
        data-options="iconCls:'icon-save',modal:true">
     <div fit="true">
        <form id="addForm" method="post" >
	        <input type="hidden" id="idId"  name="id" />
		    <table style=" border-spacing:10px; ">
		       <tr>
                   <td align="left">统计名称</td>
                   <td colspan="3">
                       <input class="easyui-validatebox" name="name" type="text" id="nameId" data-options="required:true" style="width:360px;">
                   </td>
               </tr>
               <tr>
                   <td align="left">操作表名</td>
                   <td colspan="3">
                       <input class="easyui-validatebox" name="actionTableName" type="text" id="actionTableNameId" data-options="required:true" style="width:360px;">
                   </td>
               </tr>
               <tr>
                   <td align="left">操作行为</td>
                   <td>
                       <select class="easyui-combobox" name="actionType" id="actionTypeId" panelHeight="auto" style="width:140px" data-options="required:true">
			                <option value="1" selected>统计条数</option>
		                	<option value="2">根据字段获取平均值</option>
							<option value="3">表示根据字段获取总量值</option>
			                <option value="4">自定义统计</option>
			            </select>
			       </td>
                   <td align="right">统计时间段</td>
                   <td>
	                   <select class="easyui-combobox" name="interval" id="intervalId" panelHeight="auto" style="width:140px" data-options="required:true">
			                <option value="1" selected>按分钟统计</option>
		                	<option value="2">按15分钟统计</option>
							<option value="3">按小时分钟统计</option>
							<option value="4">按天统计</option>
							<option value="0">一直统计</option>
			            </select>
                   </td>
               </tr>
               <tr>
                   <td align="left">条件字段</td>
                   <td colspan="3">
                       <textarea name="conditionKey" id="conditionKeyId" data-options="multiline:true" style="width:360px;height:80px" ></textarea>
                   </td>
               </tr>
               <tr>
                   <td align="left">计算字段</td>
                   <td colspan="3">
                       <input class="easyui-validatebox" name="valueKey" type="text" id="valueKeyId"  style="width:360px;">
                   </td>
               </tr>
               <tr>
                   <td align="left">同步表名</td>
                   <td colspan="3">
                       <input class="easyui-validatebox" name="syncTableName" type="text" id="syncTableNameId" style="width:360px;">
                   </td>
               </tr>
		    </table>
		</form>
        <div style="padding: 25px; text-align: center;">
            <a href="#" class="easyui-linkbutton" onclick="cancel();">取消</a>
            <a href="#" class="easyui-linkbutton"  onclick="save();">保存</a> 
        </div>
    </div>
</div>

</body>
</html>